<%@ page language="java"
	import="ll.sms.pojo.*,ll.sms.web.*"
	pageEncoding="UTF-8"%>
<%
	try {
		SmsChannel smsChannel = new SmsChannel();
		RequestUtils.populate(smsChannel, request);

		String repwd = request.getParameter("repwd");
		String pwd = smsChannel.getHpwd();
		if(pwd==null || pwd.trim().equals("") || !repwd.equals(pwd)){
			out.print( "{success:false,errors:{msg:'密码填写错误'}}");
			return;
		}
		System.out.print(smsChannel.getHid());
		String s = WebBusinessImpl.getInstance().registerChannel(
				smsChannel);
		SmsAppContainer.initChannelPool();
		out.print( s );

	} catch (Exception e) {
		e.printStackTrace();
		out.print("{success:false,errors:{msg:'添加失败！！'}}");
	}
%>
